Skip to content

London | 26-Jan | Gloria Mankrado | Sprint 2 | form control updated#1090

Open
gloriamanks wants to merge 2 commits intoCodeYourFuture:mainfrom
gloriamanks:feature/formcontrol
Open

London | 26-Jan | Gloria Mankrado | Sprint 2 | form control updated#1090
gloriamanks wants to merge 2 commits intoCodeYourFuture:mainfrom
gloriamanks:feature/formcontrol

Conversation

@gloriamanks
Copy link

@gloriamanks gloriamanks commented Jan 28, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

  • My form is semantic html.
  • All inputs have associated labels.
  • My Lighthouse Accessibility score is 100.
  • I require a valid name. I have defined a valid name as a text string of two characters or more.
  • I require a valid email.
  • I require one colour from a defined set of 3 colours.
  • I require one size from a defined set of 6 sizes.

##FEEDBACK UPDATES

I’ve wrapped the colour radio inputs inside their labels to improve accessibility and increased the clickable area. I’ve also added a pattern attribute to the name field to prevent space-only input.

Regarding the remaining Lighthouse warning, without using CSS it isn’t possible to increase the physical size of form controls, so I’ve applied the best possible HTML-only solution.

Questions

I have none at the moment.

@netlify
Copy link

netlify bot commented Jan 28, 2026

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit e025280
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6984c4fe2f111e00089e8e97
😎 Deploy Preview https://deploy-preview-1090--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

This comment has been minimized.

@gloriamanks gloriamanks changed the title London | 26-Jan | Gloria Mankrado | Sprint 1 | form control updated London | 26-Jan | Gloria Mankrado | Sprint 2 | form control updated Jan 28, 2026
@gloriamanks gloriamanks added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 30, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lighthouse score is 93. Reason given was, "Touch targets do not have sufficient size or spacing." (Suggestion: Ask AI how you can overcome this accessibility issue without using CSS)

image


<div>
<label for="name">Name</label>
<input type="text" name="name" id="name" placeholder="username" minlength="2" required/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently a user can enter a name consisting of only space characters (e.g., " "). Can you enforce a stricter validation rule using the pattern attribute to disallow any name that contains only space characters?

Comment on lines 30 to 31
<label for="red">Red</label>
<input type="radio" name="colour" id="red" value="red" required />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can consider wrapping the input element inside the label tags:

            <label>
              Red
              <input type="radio" name="colour" value="red" required />
            </label>

This way, we don't need to use the id and for attributes.

Copy link
Author

@gloriamanks gloriamanks Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cjyuan ,

Below are the changes i have made according to the feedback given:

  • I’ve wrapped the colour inputs inside their labels
  • I’ve also added additional requirements to the name field to prevent the issue " " referred.

Regarding the remaining Lighthouse warning, without using CSS it isn’t possible to increase the physical size of form controls, so I’ve applied the best possible HTML-only solution. According to the bot, however, this scores 100 on Accessibility
image

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants